<template>

  <div v-if="detailsArr.length>0">
    <div v-for="(item,index) in detailsArr" :key="index" class="L-margin-30">
      <div class="L-detail-title-row" @click="item.expand = !item.expand">
        <span class="L-text L-primary-text-color">
          <i class="iconfont icon-yuanzhu" style="color:#1683f7"></i>
          {{item.groupStitle}}
        </span>
        <i class="iconfont" :class="item.expand ? 'icon-zhankai1' :'icon-xiayibu2'"></i>
      </div>
      <van-cell-group v-show="item.expand">
        <template v-for="(fitem,findex) in item.groupvalue" :key="findex">
          <DetailInput :detailItem="fitem"></DetailInput>
        </template>
      </van-cell-group>
    </div>
  </div>
  <div v-else>
    <van-empty description="没有数据" />
  </div>

</template>

<script setup lang="ts">
import { defineProps, ref, watch } from "vue";
import DetailInput from "@/components/base/Detail/DetailItem.vue";

const props = defineProps({
  detailsArr: {
    type: Object,
    default: null,
  },
});
</script>

<style scoped>
</style>